#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2020/7/15 下午4:56
# @Author  : fugang_le
# @Software: PyCharm

# 获取汉字的偏旁部首、拼音

from cnradical import Radical, RunOption

radical = Radical(RunOption.Radical)
pinyin = Radical(RunOption.Pinyin)

input = '你好，今天早上吃饭了吗，我打你哈，没有的事情'
radical_out = [radical.trans_ch(ele) for ele in input]
pinyin_out = [pinyin.trans_ch(ele) for ele in input]

print(radical_out)
print(pinyin_out)

radical_out = radical.trans_str(input)
pinyin_out = pinyin.trans_str(input)

print(radical_out)
print(pinyin_out)